package com.yjx.service.impl;

import com.yjx.mapper.RoleMapper;
import com.yjx.pojo.Role;
import com.yjx.service.RoleService;
import com.yjx.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleServiceImpl implements RoleService {
    @Autowired
    private RoleMapper roleMapper;

    @Override
    public Result<List<Role>> listAllRoles() {
        List<Role> Roles = roleMapper.listAllRoles();
        return Result.success(Roles);

    }
}
